package cn.wit.Test;

import java.util.Scanner;

/**
 * 最大公约数
 * @author 16604
 *
 */

public class TestCommonDivisor {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		
		int a = in.nextInt();
		int b = in.nextInt();
		int min;
		int i;
		
		min = (a<b)?a:b;
		for(i = min;i >0;i--) {
			 if(a%i == 0&&b%i == 0){
				System.out.println("最大公约数:"+i);
				break;
			}
		}
		if(i==0) {
			System.out.println("没有最大公约数");
		}
	}

}
